﻿
using Xacml.Core;
using System;
using System.Xml;

namespace Xacml.Core.Context
{
  public class AttributeElement : AttributeElementReadWrite
  {
    public override string AttributeId
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override string DataType
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override string Issuer
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override string IssueInstant
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override AttributeValueElementCollectionReadWrite AttributeValues
    {
      get
      {
        return (AttributeValueElementCollectionReadWrite) new AttributeValueElementCollection(base.AttributeValues);
      }
      set
      {
        throw new NotSupportedException();
      }
    }

    public override string Value
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override string DataTypeValue
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override bool IsReadOnly
    {
      get
      {
        return true;
      }
    }

    public AttributeElement(string attributeId, string dataType, string issuer, string issueInstant, string value, XacmlVersion schemaVersion)
      : base(attributeId, dataType, issuer, issueInstant, value, schemaVersion)
    {
    }

    public AttributeElement(AttributeElement attributeElement)
      : base((AttributeElementReadWrite) attributeElement)
    {
    }

    public AttributeElement(XmlReader reader, XacmlVersion schemaVersion)
      : base(reader, schemaVersion)
    {
    }
  }
}
